add ozi track write test cases
authortsteven4 <13596209+tsteven4@users.noreply.github.com>
Sun, 20 Dec 2020 19:46:01 +0000 (12:46 -0700)
committertsteven4 <13596209+tsteven4@users.noreply.github.com>
Sun, 20 Dec 2020 19:46:01 +0000 (12:46 -0700)
reference/track/ozitracks.gpx [new file with mode: 0644]
reference/track/ozitracks~gpx-1.plt [new file with mode: 0644]
reference/track/ozitracks~gpx-2.plt [new file with mode: 0644]
reference/track/ozitracks~gpx.plt [new file with mode: 0644]
testo.d/ozi.test

diff --git a/reference/track/ozitracks.gpx b/reference/track/ozitracks.gpx
new file mode 100644 (file)
index 0000000..b4954fe
--- /dev/null
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gpx version="1.0" creator="GPSBabel - https://www.gpsbabel.org" xmlns="http://www.topografix.com/GPX/1/0">
+  <time>2020-12-17T13:49:58.329Z</time>
+  <bounds minlat="0.000000000" minlon="1.000000000" maxlat="2.000030000" maxlon="3.000030000"/>
+  <trk>
+    <name>track0</name>
+    <trkseg>
+      <trkpt lat="0.000000000" lon="1.000000000">
+        <time>2010-01-02T03:04:05Z</time>
+      </trkpt>
+      <trkpt lat="0.000010000" lon="1.000020000">
+        <time>2010-01-02T03:04:06Z</time>
+      </trkpt>
+    </trkseg>
+  </trk>
+  <trk>
+    <name>track1</name>
+    <trkseg>
+      <trkpt lat="1.000000000" lon="2.000000000">
+        <time>2010-01-02T03:04:07Z</time>
+      </trkpt>
+      <trkpt lat="1.000010000" lon="2.000010000">
+        <time>2010-01-02T03:04:08Z</time>
+      </trkpt>
+      <trkpt lat="1.000020000" lon="2.000020000">
+        <time>2010-01-02T03:04:09Z</time>
+      </trkpt>
+    </trkseg>
+  </trk>
+  <trk>
+    <name>track2</name>
+    <trkseg>
+      <trkpt lat="2.000000000" lon="3.000000000">
+        <time>2010-01-02T03:04:10Z</time>
+      </trkpt>
+      <trkpt lat="2.000010000" lon="3.000010000">
+        <time>2010-01-02T03:04:11Z</time>
+      </trkpt>
+      <trkpt lat="2.000020000" lon="3.000020000">
+        <time>2010-01-02T03:04:12Z</time>
+      </trkpt>
+      <trkpt lat="2.000030000" lon="3.000030000">
+        <time>2010-01-02T03:04:13Z</time>
+      </trkpt>
+    </trkseg>
+  </trk>
+</gpx>
diff --git a/reference/track/ozitracks~gpx-1.plt b/reference/track/ozitracks~gpx-1.plt
new file mode 100644 (file)
index 0000000..399cce8
--- /dev/null
@@ -0,0 +1,9 @@
+OziExplorer Track Point File Version 2.1\r
+WGS 84\r
+Altitude is in Feet\r
+Reserved 3\r
+0,2,255,track1,0,0,2,8421376\r
+0\r
+1.000000,2.000000,1,-777.0,40180.1278588,,\r
+1.000010,2.000010,0,-777.0,40180.1278704,,\r
+1.000020,2.000020,0,-777.0,40180.1278819,,\r
diff --git a/reference/track/ozitracks~gpx-2.plt b/reference/track/ozitracks~gpx-2.plt
new file mode 100644 (file)
index 0000000..21dd10f
--- /dev/null
@@ -0,0 +1,10 @@
+OziExplorer Track Point File Version 2.1\r
+WGS 84\r
+Altitude is in Feet\r
+Reserved 3\r
+0,2,255,track2,0,0,2,8421376\r
+0\r
+2.000000,3.000000,1,-777.0,40180.1278935,,\r
+2.000010,3.000010,0,-777.0,40180.1279051,,\r
+2.000020,3.000020,0,-777.0,40180.1279167,,\r
+2.000030,3.000030,0,-777.0,40180.1279282,,\r
diff --git a/reference/track/ozitracks~gpx.plt b/reference/track/ozitracks~gpx.plt
new file mode 100644 (file)
index 0000000..08f2c32
--- /dev/null
@@ -0,0 +1,8 @@
+OziExplorer Track Point File Version 2.1\r
+WGS 84\r
+Altitude is in Feet\r
+Reserved 3\r
+0,2,255,track0,0,0,2,8421376\r
+0\r
+0.000000,1.000000,1,-777.0,40180.1278356,,\r
+0.000010,1.000020,0,-777.0,40180.1278472,,\r
index 986c58ff0fc1ab0041d6d511c17b1ad2e26a6f11..51903441d0162784fc323d6825e65c0ed93b3c30 100644 (file)
@@ -17,3 +17,11 @@ compare ${REFERENCE}/track/20070813_short~plt.gpx ${TMPDIR}/20070813_short~plt.g
 gpsbabel -i ozi -f ${REFERENCE}/track/20070813_short.plt -o ozi -F ${TMPDIR}/20070813_short~plt.plt
 compare ${REFERENCE}/track/20070813_short~plt.plt ${TMPDIR}/20070813_short~plt.plt
 
+# test ozi tracks with multilple tracks which will be written to separate files
+gpsbabel -i gpx -f ${REFERENCE}/track/ozitracks.gpx -o ozi -F ${TMPDIR}/ozitracks~gpx.plt
+compare ${REFERENCE}/track/ozitracks~gpx.plt ${TMPDIR}/ozitracks~gpx.plt
+compare ${REFERENCE}/track/ozitracks~gpx-1.plt ${TMPDIR}/ozitracks~gpx-1.plt
+compare ${REFERENCE}/track/ozitracks~gpx-2.plt ${TMPDIR}/ozitracks~gpx-2.plt
+
+# test ozi with no output making sure we don't throw an error or segmentation fault.
+gpsbabel -i gpx -f ${REFERENCE}/track/ozitracks.gpx -x nuketypes,waypoints,tracks,routes -o ozi -F ${TMPDIR}/empty.plt